package Singleton;
//懒汉模式
public class LazySingleton {
    private LazySingleton(){

    }

    private static LazySingleton LazySingletonEntity = null;

    public static LazySingleton getEntity(){
        if (LazySingletonEntity == null){
            LazySingletonEntity = new LazySingleton();
        }
        return LazySingletonEntity;
    }

    public String showEntityHashCode(){
        return  Integer.toString(this.hashCode());
    }
}
